% Database Server
host = '173.194.106.119';
% Database Username/Password
% user = 'mnair';
% password = 'tsunami';

user = 'root';
password = 'iwtlnk';
% Database Name
dbName = 'geomdb_tsu';
% JDBC Parameters
jdbcString = sprintf('jdbc:mysql://%s/%s', host, dbName);
jdbcDriver = 'com.mysql.jdbc.Driver';
% Set this to the path to your MySQL Connector/J JAR
javaaddpath('/Users/Shared/Java/mysql-connector-java-5.1.27/mysql-connector-java-5.1.27-bin.jar')
% Create the database connection object
dbConn = database(dbName, user , password, jdbcDriver, jdbcString);

if isconnection(dbConn)
% Fetch the symbol, market cap, and last close for the 10 largest
% market cap ETFs

%Read data from database.
curs = exec(dbConn, ['SELECT minute_data.obsTime'...
    ' FROM 	geomdb_tsu.minute_data ']);


result = get(fetch(exec(dbConn, 'SELECT * from minute_data ')), 'Data');
disp(result);
elseb
% If the connection failed, print the error message
disp(sprintf('Connection failed:&nbsp;%s', dbConn.Message));
end;

 

%UNIX_TIMESTAMP('2007-11-30 10:30:19')